<div class="container">

	<div class="raw-fluid">
		<div class="span12">{{>config-navigation}}</div>
	</div>

	<div class="raw">
		<div class="span12">
			<div class="raw-fluid">

				<div class="block">
					<div class="block-header">
						<div class="block-header-title pull-left">Roles</div>
						<div class="pull-right">
							<a class="btn btn-orange btn-config" href="add">Add Role</a>
						</div>
					</div>

					<div class="block-body block-body container-fluid raw-fluid">

						<div class="span11">

							<table cellpadding="0" cellspacing="0" border="0"
								class="table table-striped table-bordered" id="main-table">
								<thead>
									<tr>
										<th>Name</th>
										<th>Type</th>
										<th>Action</th>
									</tr>
								</thead>
								<tbody>
									{{#data.groups}}
									<tr>
										<td>{{name}}</td>
										<td>{{type}}</td>
										<td class="center">
											{{#compare ../contextData.user.role 'admin'}}
												{{#compare type 'mam' operator='!='}}
													<a href="assign_permissions?group={{name}}" data-group="{{name}}"  data-toggle="modal" title="Assign Permissions"
													class="add-permission-link"><i class="icon-cog"> </i> Permissions </a> &nbsp;
												{{/compare}}
											{{/compare}}
											<a href="view_users?group={{name}}" data-group="{{name}}"  data-toggle="modal" title="View Users"
												><i class="icon-user"> </i> View Users </a> &nbsp;
												
											{{#compare type 'mam' operator='!='}}
											<a href="#"  class="btn-invite" data-item="{{name}}" title="Invite"><i class="icon-envelope"> </i> Invite</a>&nbsp; 
											{{/compare}}
												
											{{#compare type 'user'}}
											 <a href="edit?group={{name}}" data-group="{{name}}"  data-toggle="modal" title="Rename"
												><i class="icon-edit"> </i> Rename</a> &nbsp;
											
											 <a href="assign_users?group={{name}}" data-group="{{name}}"  data-toggle="modal" title="Assign Users"
												><i class="icon-user"> </i> Assign Users </a> &nbsp;
												
											<a href="#"  class="btn-item-remove" data-item="{{name}}" title="Remove"
											><i class="icon-remove"> </i> Remove</a> &nbsp;
											{{/compare}}																									
										</td>
									</tr>
									{{/data.groups}}
								</tbody>
							</table>


						</div>

					</div>

				</div>

			</div>

		</div>

	</div>

</div>




<!-- Modal Permissions -->
<div id="assignPermissions" class="modal hide" tabindex="-1" role="dialog" aria-hidden="true"  style="width:700px">

	
		<div class="modal-header">
			<button class="close" data-dismiss="modal">
				x
			</button>
			<h3 id="assign-permission-heading"></h3>
		</div>
		<div class="modal-body">

			<div class="control-group">
								<label class="control-label" for="inputGroupId">Features:</label>
								<div class="controls">
									 <div id="tree3"> </div>
								</div>
			</div>

		</div>
		<div class="modal-footer">
			<a href="#" class="btn" data-dismiss="modal">Close</a>
			<a href="#" id="btn-add-features" class="btn btn-orange" data-dismiss="modal">Assign</a>
		</div>

</div>

